import request from '@/utils/request'

export function fetchCates() {
    return request({
        url: '/goods/cates',
        method: 'GET',
        params: {}
    })
}

export function fetchGoodList(params) {
    return request({
        url: '/goods/list',
        method: 'GET',
        params
    })
}

export function fetchGoodSubmit(data) {
    return request({
        url: '/goods/update',
        method: 'POST',
        data
    })
}

export function fetchGoodInfo(id) {
    return request({
        url: '/goods/info',
        method: 'GET',
        params: {
            id
        }
    })
}